package com.lrd.snapshotorder.protocol.dto.order;

import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;

import javax.validation.constraints.Max;
import javax.validation.constraints.Min;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.util.Date;

/**
 * 订单生成任务入参
 */
@Data
public class OrderTaskCreateDto {


    /**
     * 交货时间
     */
    @NotNull(message = "交货时间不能为空")
    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
    private Date postTime;

    /**
     * 批次订单数量
     */
    @NotNull(message = "批次生成订单数量不能为空")
    @Min(value = 1, message = "批次单量下限1")
    @Max(value = 200000, message = "批次单量上限20万")
    private Integer batchSize;

    /**
     * 金额下限
     */
    private Integer minAmount;

    /**
     * 金额上限
     */
    private Integer maxAmount;

    private Integer defaultAmount;

    /**
     * range-金额区间，numeric-固定金额
     */
    @NotBlank(message = "场景不能为空")
    private String scene;

    /**
     * 批次号
     */
    private Integer batchNumber;

}
